<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>title</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" type="text/css">
</head>
<body>

<div style="margin-top: 10px;margin-bottom: 10px;margin-left: 10px">
    <div class="layui-form-item">
        <form th:action="@{/user/search}" method="post" class="layui-inline">
            <div class="layui-inline">
                <a class="layui-btn layui-btn-primary layui-border-blue" th:href="@{/user/add}">新增</a>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" name="uid" lay-verify="title" autocomplete="off" placeholder="请输入ID" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" name="uname" lay-verify="title" autocomplete="off" placeholder="请输入姓名" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <div class="layui-input-inline">
                    <input type="text" name="uage" lay-verify="title" autocomplete="off" placeholder="请输入年龄" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <button type="submit" class="layui-btn layui-btn-normal">
                    <i class="layui-icon">
                        &#xe615;
                    </i>
                </button>
            </div>
        </form>
    </div>
</div>

</div>
<table class="layui-table">
    <thead>
    <tr>
        <th>ID</th>
        <th>名字</th>
        <th>年龄</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="user:${users}">
        <td th:text="${user.getUid()}"></td>
        <td th:text="${user.getUname()}"></td>
        <td th:text="${user.getUage}"></td>
        <td>
            <a class="layui-btn layui-btn-primary layui-border-blue" th:href="@{'/user/delete/'+${user.getUid()}}">删除</a>
            <a class="layui-btn layui-btn-primary layui-border-blue" th:href="@{'/user/update/'+${user.getUid()}}">修改</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>